﻿select GID from bas_plcaddress_zy where DB_NODEID in('ns=2;s=JRL.JRL1.RUN','ns=2;s=JRL.JRL1.XSWD1','ns=2;s=JRL.JRL1.XSWD12','ns=2;s=JRL.JRL1.XSWD2','ns=2;s=JRL.JRL1.XSWD22'
,'ns=2;s=JRL.JRL1.LMG','ns=2;s=JRL.JRL1.LMK','ns=2;s=JRL.JRL2.XSWD1','ns=2;s=JRL.JRL2.XSWD12','ns=2;s=JRL.JRL2.XSWD2'
,'ns=2;s=JRL.JRL2.XSWD22','ns=2;s=JRL.JRL2.LMG','ns=2;s=JRL.JRL2.LMK','ns=2;s=JRL.JRL2.RUN','ns=2;s=JRL.JRL3.RUN'
,'ns=2;s=JRL.JRL3.XSWD','ns=2;s=JRL.JRL4.XSWD1','ns=2;s=JRL.JRL4.XSWD2','ns=2;s=JRL.JRL4.XSWD3','ns=2;s=JRL.JRL4.LMG3'
,'ns=2;s=JRL.JRL4.LMK3','ns=2;s=JRL.JRL4.LMG4','ns=2;s=JRL.JRL4.LMK4','ns=2;s=JRL.JRL4.RUN','','');


select * from bas_equipment_zy 

go


select * from pmbf_work_cell where code ='WL0051'

select * from uex_vtrack_record uvr inner join uex_furnace_handle_record ufhr on uvr.GID=ufhr.VTRACK_RECORD_GID and uvr.UDA1=1 
where uvr.WORK_CELL_GID='8F8C33CF-1B03-4C71-AE0B-1A51DC808CA4'

select * from uex_vtrack_record uvr inner join uex_furnace_handle_record ufhr on uvr.GID=ufhr.VTRACK_RECORD_GID  
where uvr.WORK_CELL_GID=(select code from pmbf_work_cell where code ='WL0051')


SELECT GID, UDA3 AS FORGING_NO, PRODU_CODE, PRODU_NAME, PRODU_SIZE,DIS_CODE_STATE PRODU_STATE,cast(order_weight as decimal(8,3)) ORDER_WEIGHT,
cast(process_weight as decimal(8,3)) PROCESS_WEIGHT,cast(porcess_combine as int) PORCESS_COMBINE,routeLineName PORCESS_NAME ,
DISPATCH_CODE, ORDER_GID, WORK_CENTER_GID, WORK_CELL_GID, ROUTE_GID 
FROM  v_jrl_infurnace


SELECT GID, UDA3 AS FORGING_NO, PRODU_CODE, PRODU_NAME, PRODU_SIZE,DIS_CODE_STATE PRODU_STATE,makingOrderUda1c PRODU_HEATNO ,WorkCellName FURNACE_NAME ,cast(order_weight as decimal(8,3)) ORDER_WEIGHT,cast(process_weight as decimal(8,3)) PROCESS_WEIGHT,cast(porcess_combine as int) PORCESS_COMBINE,routeLineName PORCESS_NAME ,DISPATCH_CODE, ORDER_GID, WORK_CENTER_GID, WORK_CELL_GID, ROUTE_GID 
FROM  v_jrl_outfurnace   
ORDER BY FURNACE_NAME,FORGING_NO

select top 1000 * from uex_furnace_handle_record where MODIFY_DATE>='2021-10-01' and OUT_TIME is null

select * from dy_plc_parameter

select * from v_jrl_dy1 order by RWD
